package com.cskaoyan.mapper;

import com.cskaoyan.bean.Goods;
import com.cskaoyan.bean.GoodsExample;

import java.util.List;


import com.cskaoyan.bean.StatGoods;
import com.cskaoyan.bean.vo.CarAndBrandVo;

import java.util.Map;

import com.cskaoyan.bean.wx.vo.IndexGoodsList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface GoodsMapper {
    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    List<CarAndBrandVo> queryBrandAllIdAndName();

    List<CarAndBrandVo> queryCatAllIdAndName();

    Map<String, Object> selectMapByGoodsId(@Param("goodsId") Integer goodsId);

    List<StatGoods> statGoodsGroupByAddtime();

    List<IndexGoodsList> selectGoodsList(@Param("is") String is);

    List<IndexGoodsList> selectGoodsLists(@Param("categoryId") Integer categoryId);

    List<IndexGoodsList> selectRelatedGoodsList(@Param("id") Integer id);

    Integer selectBrandId(@Param("id") Integer id);

    String selectShareImages(@Param("id") Integer id);

    Integer selectSonCategoryId(Integer id);

    String selectLevel(@Param("id") Integer id);
}


